Skip to content

docs(skills): clear the GraphQL residue from the published catalog and declare sharingModel on its four object examples - #11141

Merged
os-zhuang merged 3 commits into
mainfrom
claude/issue-10846-skills-catalog-pair
Aug 23, 2026
Merged

os-zhuang merged 3 commits into
mainfrom
claude/issue-10846-skills-catalog-pair

Conversation

@os-zhuang

@os-zhuang os-zhuang commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #10846
Fixes #10925

Two cards on the published skills catalog, one commit each. Both are corrections to
skills/** — the customer/AI-facing surface — so the whole PR is GOVERNED: draft, human
merge, no auto-merge, no enqueue.

Commit 1 — #10846: five GraphQL residue sites + the mirror

/graphql is not mounted. Re-verified at fix time against origin/main afe1c4e, not
taken from the card:

  • packages/runtime/src/http-dispatcher.ts:2069 — // /graphql removed — GraphQL is not in the product plan (#2462 follow-on).
  • 0 hits for createGraphQLDomain under packages/*/src; handleGraphQL survives only in CHANGELOGs
  • packages/spec/src/system/core-services.zod.ts:130-132 independently records that graphql was never a CoreServiceName
Site Fix
skills/objectstack-api/SKILL.md tags dropped graphql — the description one line above already lists no GraphQL surface
skills/objectstack-data/SKILL.md apiEnabled REST + MCP, the two surfaces the flag actually gates (packages/mcp/src/stdio-data-bridge.ts:260 reads enable.apiEnabled === false)
skills/objectstack-platform/SKILL.md mount line createHonoApp mounts auth and discovery only
skills/objectstack-formula/SKILL.md GraphQL.ComputedField row deleted
skills/objectstack-formula/SKILL.md api/graphql cache-key row deleted

The /storage half of the platform line was verified before touching, as the card
asked, and the card is right — so it is corrected in the same edit, same line, same defect
class: packages/adapters/hono/src/index.ts:423 is // --- Storage: deliberately NOT mounted (#4087) ---, and the dispatcher carries the matching No /storage domain (#4087)
note. service-storage mounts its own surface.

Deletion rather than replacement on the two formula rows: nothing real fills either
slot. The computed-field CEL host is already the Field / type: 'formula' row above it,
and no cache-key template surface exists — system/cache takes plain key patterns and
api/http-cache.zod.ts has no key or template member at all.

The mirror row in content/docs/ai/skills-reference.mdx moves in this same commit, per the
card's anti-drift requirement. Rows naming GraphQL as a general industry concept were left
alone (the card's not-in-scope note); after this commit skills/** has zero GraphQL hits.

Commit 2 — #10925: four sharingModel declarations, then the gate root

The 4 ObjectSchema.create() examples omitted sharingModel — type-checks clean, while
os validate rejects it as severity error (SECURITY_OWD_UNSET).

Site Value Mirrored or defaulted
objectstack-data account 'private' defaulted
objectstack-data invoice 'private' defaulted
objectstack-data support_case 'private' defaulted
objectstack-upgrade crm_lead 'public_read_write' mirrored

examples/ carries no object named account, invoice or support_case. The showcase
app's showcase_account / showcase_invoice are differently-named objects, and their
public_read_write is an explicit ADR-0090 D1 grandfather stamp — the source comment reads
"record isolation for this demo object is RLS-owned / intentionally public". A demo's
stamp is not a value to teach, so those three take the rule's own recommended default.

crm_lead is the one exact name match: examples/app-crm/src/objects/lead.object.ts is
name: 'crm_lead', so the skill and the app disagreeing about one object's OWD would be
real drift. ⚠️ Reviewer call worth making explicitly: that value is itself a demo
grandfather stamp, so mirroring it teaches public_read_write in the upgrade skill. The
alternative ('private', consistent with the other three) trades app-consistency for a
safer taught default. Flagged rather than decided. Resolved 2026-08-23 — the
maintainer ruled, of the two options put to them (verbatim): 「镜像 public_read_write(推荐)」.
The mirrored value stands; no diff change.

Only then the gate half. check-doc-security-posture grows the skills/ root its own
header recorded as deferred, following check-skill-examples.ts's SOURCE_ROOTS
two-root/two-marker shape (.md + <!-- os:check -->; .mdx keeps the MDX comment
spelling, since fumadocs-mdx fails the build outright on HTML comments). Sequencing is the
point — extending the roots first would have made the gate born red.

Two holes the generalization could have opened, closed in the same commit:

  • the anti-idle floor is now per root (a root scanned with the wrong marker reads zero
    blocks, and one whole-corpus counter would have stayed green on the other root's census
    while a governed corpus went unjudged);
  • an exemption entry belonging to no root would be dropped by the per-root routing and
    never judged stale, silently ending the ledger's self-invalidating discipline — now a
    loud refusal.

check:skills-token-ratchet — was RED, cleared by maintainer ruling (2026-08-23)

Maintainer ruling, 2026-08-23, on this PR (verbatim, of the three options put to
them — A raise the ceilings / B fund by prose deletion / C land commit 1 alone):
「A:提天花板(推荐)」

Executed as commit c41928cb7: scripts/check-skills-token-ratchet.mjs ceilings
objectstack-data 13797→13817, objectstack-upgrade 8325→8335, each annotated with
the ruling date and this PR. Gate + its 33-case self-test green at that commit —
✓ check-skills-token-ratchet: 11 published SKILL.md within their ceilings.

What was red, kept for the record:

✗ check-skills-token-ratchet: skills/objectstack-data/SKILL.md is 13817 tokens; the ratchet ceiling is 13797 (over by 20).
✗ check-skills-token-ratchet: skills/objectstack-upgrade/SKILL.md is 8335 tokens; the ratchet ceiling is 8325 (over by 10).

Every ceiling in the catalog sat at exactly zero headroom before this PR. The four
sharingModel lines are required by a gating-tier security rule, and they cost 30 tokens
across two files that have nowhere to put them. The gate names the only two remedies, and
both are marked ⛔ MAINTAINER-ONLY: delete text in the same file, or raise the ceiling in
a PR quoting a maintainer ruling.

The author took neither remedy unilaterally — deleting published-catalog prose to fund a
fix is an editorial call on the surface the maintainer ruled the platform's highest-value
one, and raising a ceiling is explicitly not an author's step. The ruling above is what
authorizes the raise.

Worth weighing, because the per-file unit hides it: the bundle as a whole grows by 3
tokens.
Commit 1's residue deletions pay back 27 of the 30 — they just land in the wrong
files.

   skills/objectstack-api/SKILL.md            6346 /   6348   (-2)
   skills/objectstack-data/SKILL.md          13817 /  13797   (+20)
   skills/objectstack-formula/SKILL.md        6036 /   6055   (-19)
   skills/objectstack-platform/SKILL.md      12710 /  12716   (-6)
   skills/objectstack-upgrade/SKILL.md        8335 /   8325   (+10)
   bundle total                             117922 / 117919   (+3)

(Commit 1 is clean on its own — it only shrinks, -27 tokens — and was the fallback
option C; the ruling made splitting unnecessary.)

Value-density readings (skills/** governed-surface requirement)

Whole-file, before → after:

File Lines Tokens (ceil(utf8 bytes / 4))
objectstack-api/SKILL.md 610 → 610 (0) 6348 → 6346 (-2)
objectstack-data/SKILL.md 1207 → 1210 (+3) 13797 → 13817 (+20)
objectstack-formula/SKILL.md 556 → 554 (-2) 6055 → 6036 (-19)
objectstack-platform/SKILL.md 1286 → 1286 (0) 12716 → 12710 (-6)
objectstack-upgrade/SKILL.md 695 → 696 (+1) 8325 → 8335 (+10)

Whole package (all 11 published SKILL.md): 10504 → 10506 lines (+2), 117919 → 117922
tokens (+3)
. No prose was expanded; every addition is a required schema key and every
deletion is a removed-surface assertion.

Verification

Gates derived with node scripts/pm/dispatch-gates.mjs (no hand-fed paths) at the final
commit e87585fa5, then run — 25 families, 24 green, 1 red (the ratchet above).

✅ 26 ObjectSchema.create example(s) in 227 marked block(s) across 237 prose file(s) in 2 root(s) carry an os validate-clean security posture
   docs     22 create site(s) in 191 marked block(s) across 189 .mdx file(s)
   skills    4 create site(s) in  36 marked block(s) across 48 .md file(s)
✓ doc authoring guard: 389 files clean — no bare metadata literals.
  check:role-word — Scanned: 225 .md/.mdx file(s) read across 2 root(s) — content/docs 189, skills 36.
✓ check-skill-compatibility-version: 11 SKILL.md file(s) reconciled against 78 workspace packages
✓ check-skill-frame-sync: 4 copies of the decision frame are structurally isomorphic across 3 files
check-nul-bytes: OK (scanned 6447 text file(s) ...; no raw ASCII control bytes).

Also green: check:doc-formula-expressions, doc-anchors, doc-frontmatter,
docs-audit-scope, docs-redirects, published-readme-links, pm-governed-merges,
cross-package-test-inputs, slot-lookup, test-source-alias, type-source-resolution,
ci-filter-parity, plugin-teardown-shape, affected-docs, and the four
spec-liveness-check families.

Reverse-verification of the extended gate (from the committed state, restore proven on
disk): re-removing the support_case sharingModel took the gate red at exactly that
site —

skills/objectstack-data/SKILL.md:323  object "support_case"  [security-owd-unset]

and restoring returned it to the green census above. The mutation was confirmed on disk
before the run (sharingModel count 3 → 2 plus the site read back), not inferred from the
editor's exit code. Noting one real stumble for the record: the restore trap fired with the
wrong working directory and printed a false "RESTORED" over a pathspec did not match
error — caught by re-reading git status, and the tree was restored by hand and
re-verified byte-identical before anything else ran.

No changeset

packages/lint's published files is ["dist","README.md","CHANGELOG.md"], with no bin
and dist-only exports — scripts/** ships to no consumer. This PR touches no package
src/, so no published artifact changes and nothing releases. Declared with
skip-changeset rather than an empty-frontmatter changeset, which
scripts/check-empty-changeset.mjs rejects outright.

Out of scope, filed not fixed

#11140 — the same GraphQL residue class two sites further in, in package SOURCE comments
(packages/spec/src/data/object.zod.ts:252, packages/adapters/hono/src/index.ts:105-106).
The hono JSDoc is the likely origin of the stale platform-skill line this PR fixes,
/storage included. Left out deliberately: different surface, different gate family, and
folding it in would be unreviewable scope creep on a governed diff.


Generated by Claude Code


Generated by Claude Code

claude added 2 commits August 22, 2026 20:29
…age mount

`/graphql` is not mounted: `packages/runtime/src/http-dispatcher.ts:2069` is
`// /graphql removed — GraphQL is not in the product plan (#2462 follow-on)`,
there is no `createGraphQLDomain` among the registered domains (0 hits under
`packages/*/src`), and `handleGraphQL` survives only in CHANGELOGs. Five sites
in the published catalog still described it as a live ObjectStack surface —
the input that generates client code against a route which 404s.

- `objectstack-api` tags: drop `graphql` (the description one line above
  already lists no GraphQL surface).
- `objectstack-data` `apiEnabled`: REST + MCP, the two surfaces the flag
  actually gates (`packages/mcp/src/stdio-data-bridge.ts:260` reads
  `enable.apiEnabled === false`).
- `objectstack-platform` mount line: `createHonoApp` mounts auth and
  discovery only. `/storage` was stale on the same line and is corrected in
  the same edit — `packages/adapters/hono/src/index.ts:423` is
  `// --- Storage: deliberately NOT mounted (#4087) ---`, and the dispatcher
  carries the matching "No `/storage` domain (#4087)" note.
- `objectstack-formula`: the `GraphQL.ComputedField` CEL-host row and the
  `api/graphql` cache-key row are deleted rather than replaced — no real
  surface fills either slot (the computed-field CEL host is already the
  `Field` / `type: 'formula'` row above it, and no cache-key template surface
  exists: `system/cache` takes plain key patterns, `api/http-cache` has none).

The mirror row in `content/docs/ai/skills-reference.mdx` moves in this same
commit, per the card's anti-drift requirement — never before or after the
skill it catalogs.

Bundle effect: -27 tokens on the published skills ratchet.

Fixes #10846
…n skills/ for it

The 4 `ObjectSchema.create()` examples inside os:check-marked blocks in the
published catalog omitted `sharingModel`. The omission type-checks clean
(`z.enum([...]).optional()`, no `.default()`) while `os validate` rejects it as
severity: 'error' (`SECURITY_OWD_UNSET`) — so a reader copying a canonical
example got a failing build with no hint from the page, multiplied by every AI
that copies the catalog verbatim.

Values, per the #10714 sweep's shape:

- `account`, `invoice`, `support_case` (objectstack-data) -> `'private'`, the
  rule's own recommended default. DEFAULTED, not mirrored: `examples/` carries
  no object of these names. The showcase app's `showcase_account` /
  `showcase_invoice` are differently-named objects whose `public_read_write` is
  an explicit ADR-0090 D1 grandfather stamp ("record isolation for this demo
  object is RLS-owned / intentionally public") — a demo's stamp, not a value to
  teach.
- `crm_lead` (objectstack-upgrade) -> `'public_read_write'`, MIRRORED:
  `examples/app-crm/src/objects/lead.object.ts` is the same object name, and
  the skill and the app disagreeing about one object's OWD is the drift this
  mirrors away. Flagged for review in the PR body — the real object's value is
  itself a demo grandfather stamp.

Only then the gate half. `check-doc-security-posture` grows the `skills/` root
its own header recorded as deferred, following `check-skill-examples`'
SOURCE_ROOTS two-root/two-marker shape: `.md` + `<!-- os:check -->` for skills,
`.mdx` + the MDX comment spelling for docs, since MDX has no HTML comments.
Sequencing is the point — extending the roots before the 4 fixes would have
made the gate born red.

Two holes the generalization could have opened, closed here:

- The anti-idle floor is now PER ROOT. A root scanned with the wrong marker
  reads zero marked blocks, and a single whole-corpus counter would have stayed
  green on the other root's census while a governed corpus went unjudged.
- An exemption entry belonging to no root would be dropped by the per-root
  routing and never judged stale, silently ending the ledger's
  self-invalidating discipline. It is now a loud refusal.

Self-test grows a skills leg proving the .md root judges its own marker, and
that neither spelling crosses into the other root.

No changeset: `packages/lint`'s published `files` is ["dist","README.md",
"CHANGELOG.md"] with no `bin` and dist-only `exports`, so `scripts/**` ships to
no consumer, and this commit touches no package `src/`. The PR declares that
with `skip-changeset`.

Fixes #10925
@os-zhuang os-zhuang added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 22, 2026 — with Claude
@os-zhuang os-zhuang self-assigned this Aug 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 22, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review August 23, 2026 00:38
@os-zhuang
os-zhuang marked this pull request as draft August 23, 2026 00:38
…23 maintainer ruling

The four sharingModel keys commit 2 adds are required by the gating-tier
SECURITY_OWD_UNSET rule and cost 30 tokens in two files whose ceilings sat at
exactly zero headroom. Maintainer ruling, 2026-08-23, on PR #11141 (option A of
the three put to them, verbatim): 「A:提天花板(推荐)」 — data 13797→13817,
upgrade 8325→8335, quoted in the PR body as this gate's own header requires.
The same ruling confirmed crm_lead keeps the mirrored 'public_read_write'
(「镜像 public_read_write(推荐)」), so no diff change accompanies the raise.

Bundle-level the PR still nets +3 tokens (commit 1 pays back 27 elsewhere);
gate and its 33-case self-test green at this commit.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MsbKEG4LtERSLaDrbehM3e
@os-zhuang
os-zhuang marked this pull request as ready for review August 23, 2026 01:10
@os-zhuang
os-zhuang added this pull request to the merge queue Aug 23, 2026
Merged via the queue into main with commit 2f93d0f Aug 23, 2026
35 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-10846-skills-catalog-pair branch August 23, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[finding] Five GraphQL residue sites in skills/** still teach a removed surface, and one is mirrored into ai/skills-reference.mdx

2 participants